package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.GoodsComment;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface GoodsCommentMapper extends BaseMapper<GoodsComment> {

    @Select("select * from app_goods_comment where goods_id=#{id}")
    List<GoodsComment> selectByGoodsId(@Param("id") Long id);

    @Delete("delete from app_goods_comment where goods_id=#{id}")
    void deleteByGoodsId(@Param("id") Long id);


    void insertBatch(@Param("goodsId")Long goodsId,@Param("list") List<GoodsComment> list);
}
